Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplication of filters on back #2998

Merged
merged 1 commit into from
May 4, 2018

Conversation

evanboho
Copy link
Contributor

@evanboho evanboho commented Mar 7, 2018

Bug: filters are duplicated when using back button
Repro steps:
Using Chrome, visit a list page, apply a filter, click into an element, click back button
Using these steps, I see a duplicated filter. RailsAdmin is appending the filters regardless
of whether or not they are there.

This fixes that by adding an id to each filter based on the name and index.
Before appending, it removes any filters with that id.

I haven't been able to figure out how to write specs for this. Any assistance would be appreciated.

Bug: filters are duplicated when using back button
Repro steps:
Using Chrome, visit a list page, apply a filter, click into an element, click back button
Using these steps, I see a duplicated filter. RailsAdmin is appending the filters regardless
of whether or not they are there.

This fixes that by adding an id to each filter based on the name and index.
Before appending, it removes any filters with that id.
@mshibuya mshibuya merged commit cb49944 into railsadminteam:master May 4, 2018
@mshibuya
Copy link
Member

mshibuya commented May 4, 2018

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants